package com.jimmy.medical.repository;

import com.jimmy.medical.entity.UploadFile;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UploadFileRepository extends JpaSpecificationExecutor<UploadFile>, PagingAndSortingRepository<UploadFile, Long> {
    List<UploadFile> findByRelatedKey(String relateKey);

    List<UploadFile> findAllByRelatedKeyAndUseType(String relatedKey, Integer useType);
}
